package com.example.demo.feignClient;

import com.example.demo.entity.ResultMsg;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author user
 */
@FeignClient(name = "order-service")
public interface OrderClient {

    /**
     * 新增订单
     * @param userId
     * @param productId
     * @param amount
     * @return
     */
    @PostMapping("/order/insertOrder")
    ResultMsg insertOrder(@RequestParam("userId") Long userId,
                          @RequestParam("productId") int productId,
                          @RequestParam("amount") int amount);
}
